The present invention relates to a semiconductor device and, more particularly, to a semiconductor device in which security measures are implemented on information held in an internal memory or the like.
In recent years, many security techniques using encryption technology for improvement in resistance to an unauthorized access to a semiconductor device or prevention of imitation are proposed. In the encryption technology, an encryption key is used. Patent documents 1 and 2 disclose techniques of security measures using the encryption key.
Patent document 1 discloses a technique that, at the time of writing data to a recording medium, by writing dummy data in a dummy address generated on the basis of an encryption key, regular data and the dummy data are recorded in a merged state in the recording medium. The technique of Patent document 1 prevents illegality such as data copy. Patent document 2 discloses a technique of generating an encryption value by encrypting an invariant information piece by using a digest table, applying a hash function to the encryption value to obtain a hash value, and using it as a recording address which corresponds to the invariant information piece on a one-to-one basis. In Patent document 2, there are a plurality of encryption keys in the digest table, and a recording address is varied among the encryption keys. Consequently, in Patent document 2, resistance to an attack such as an attack attempted using an invariant information piece generating the same hash value can be improved.